﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using BrokerBase.Lib.Policy;

namespace broker.duty.TK
{
    class Class4
    {
        public void Calc1(IPolicyPeriodActing ppa, IDutyActing da)
        {
            if (ppa.Period > 0 && ppa.IsAtPaymentPeriod && ppa.PolicyActing.Policy.PaymentPeriodLength > 1)
            {
                da.Value = ppa.Amount * 0.02;
            }
        }

        public void Calc1(IPolicyPeriodActing ppa, IDutyActing da)
        {
            if (ppa.Period > 0 && ppa.Age <= 60)
            {
                da.Value = ppa.Amount * 0.1;
            }
            else if (ppa.Period > 0 && ppa.Age > 60 )
            {
                da.Value = ppa.Amount * 0.2;
            }
        }

        public void Calc1(IPolicyPeriodActing ppa, IDutyActing da)
        {
            if (ppa.SchemePeriodActing.HolderStates.Contains("身故"))
            {
                ppa.Fee = 0;

            }
        }

    }
}
